﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HRM.BLL;
using HRM.DAL.Report;

namespace HRM.Report
{
    public partial class trainedEmployee : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void GetAllTrainee(object o, EventArgs e)
        {
            int id = Convert.ToInt32(txtTrainingId.Value);
            List<ReportTrainedEmployee> trainedEmployees = new List<ReportTrainedEmployee>();
            TrainingManager manager = new TrainingManager();
            trainedEmployees = manager.GetAllTrainedEmployee(id);
            ReportOnTrainedEmployee report=new ReportOnTrainedEmployee();
            report.SetDataSource(trainedEmployees);
            CrystalReportViewer1.ReportSource = report;
        }
    }
}